package parts10.lesson138;

import parts10.lesson137.Person;

import java.util.Enumeration;
import java.util.HashSet;
import java.util.Set;
import java.util.TreeSet;

/**
 * 
 */
public class Demo {
    public static void main(String[] args) {
        Set<Person> all=new HashSet<Person>();
        all.add(new Person("张三",12));
        all.add(new Person("张三",12));
        all.add(new Person("王五",18));


        System.out.println(all);
        /**
         * [Person{name='王五', age=18}, Person{name='张三', age=12}, Person{name='张三', age=12}]
         */
    }
}
